package com.city.springcloud.entity;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * Created with IntelliJ IDEA.
 * User: Cheng
 * Date: 2020/4/25
 * Time: 20:34
 * Description: No Description
 *
 * Serializable序列化，所有实体类必须实现序列化，http通信传输需要序列化
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)//开启链式写法
/*
* 链式写法
* Dept dept=new Dept()
* dept.setno(1).setname("成").setage(20)
* */
public class Dept implements Serializable {
    private Long deptId;
    private String deptName;
    /**
     * dbSource字段说明：用于指定识别该实体类来自哪个数据库，因为微服务可以存在多个数据库
     */
    private String dbSource;

    public Dept(String deptName) {
        this.deptName = deptName;
    }
}
